home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / dragonball-kart.swf / scripts / frame_21 / PlaceObject2_338_990 / CLIPACTIONRECORD onClipEvent(load).as < prev   
Encoding:
Text File  |  2011-10-17  |  3.3 KB  |  119 lines

  1. onClipEvent(load){
  2.    function move(x, y)
  3.    {
  4.       b = this.getBounds(this);
  5.       h = true;
  6.       _root.gor._x -= x;
  7.       _root.bgg._x -= x / 10;
  8.       _Y = _Y + y;
  9.       isReady = false;
  10.       for(i in _root.gor)
  11.       {
  12.          if(this.r.hitTest(_root.gor[i]))
  13.          {
  14.             if(x != 0)
  15.             {
  16.                if(x > 0)
  17.                {
  18.                   v = 1;
  19.                }
  20.                else
  21.                {
  22.                   v = -1;
  23.                }
  24.                while(this.r.hitTest(_root.gor[i]))
  25.                {
  26.                   spon = 0;
  27.                   _root.gor._x += v;
  28.                   _root.bgg._x += v / 10;
  29.                }
  30.                _root.bgstop = 0;
  31.             }
  32.             else
  33.             {
  34.                jumping = false;
  35.                if(y > 0)
  36.                {
  37.                   v = 1;
  38.                }
  39.                else
  40.                {
  41.                   v = -1;
  42.                }
  43.                while(this.r.hitTest(_root.gor[i]))
  44.                {
  45.                   ka = 1;
  46.                   while(ka <= _root.maxbns[_root.stage])
  47.                   {
  48.                      if(this.tar.hitTest(_root.gor["bns" + ka]) and _root.gor["bns" + k].dead != 1 and _root.bonus == 0)
  49.                      {
  50.                         _root.efek2.attachSound("item");
  51.                         _root.efek2.setVolume(100);
  52.                         _root.efek2.start();
  53.                         if(_root.gor["bns" + ka].pol != 1)
  54.                         {
  55.                            if(_root.nowball != 7)
  56.                            {
  57.                               _root.bonus = random(5) + 1;
  58.                            }
  59.                            else
  60.                            {
  61.                               _root.bonus = random(4) + 1;
  62.                            }
  63.                            if(_root.bonus == 5)
  64.                            {
  65.                               _root.nowball = _root.nowball + 1;
  66.                               _root["br" + _root.nowball]._visible = 1;
  67.                            }
  68.                            if(_root.bonus == 3)
  69.                            {
  70.                               _root.bonus3 = 0;
  71.                            }
  72.                            if(_root.bonus != 5)
  73.                            {
  74.                               _root.bot.gotoAndStop(_root.bonus + 1);
  75.                            }
  76.                            else
  77.                            {
  78.                               _root.bonus = 0;
  79.                            }
  80.                            _root.gor["bns" + ka].pol = 1;
  81.                            _root.gor["bns" + ka].dead = 1;
  82.                            _root.gor["bns" + ka].gotoAndStop(2);
  83.                            break;
  84.                         }
  85.                      }
  86.                      ka++;
  87.                   }
  88.                   _Y = _Y - v;
  89.                }
  90.             }
  91.             h = false;
  92.             break;
  93.          }
  94.       }
  95.       return h;
  96.    }
  97.    this.stop();
  98.    ben = 0;
  99.    divr = 0;
  100.    kena = 0;
  101.    kena2 = 0;
  102.    k = 0;
  103.    k2 = 0;
  104.    keno = 0;
  105.    kamecharge = 0;
  106.    shields = 0;
  107.    kkm = 0;
  108.    fini = 0;
  109.    ssp = 5;
  110.    pauss = 0;
  111.    jumping = false;
  112.    fall = false;
  113.    isReady = false;
  114.    jumpc = 0;
  115.    bo = 0;
  116.    vary = 0;
  117.    bani = 120;
  118. }
  119.